package io.gitee.minelx.filesystem.provider;

import io.gitee.minelx.filesystem.values.PathDescription;

import java.nio.file.FileSystem;

class JavaFS implements FS {

	private static final String SCHEMA_AND_AUTHORITY = "file://";

	private final FileSystem fileSystem;

	JavaFS(FileSystem fileSystem) {
		this.fileSystem = fileSystem;
	}

	@Override
	public PathMethodProvider provider(PathDescription description) {
		return new JavaFSPathMethodProvider(fileSystem, SCHEMA_AND_AUTHORITY, description);
	}

	@Override
	public String schemaAndAuthority() {
		return SCHEMA_AND_AUTHORITY;
	}
}
